package cn.admin.service.impl;

import cn.admin.dao.ByStagesMapper;
import cn.admin.service.ByStagesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: 毛苏宇
 * @Description: You can do it!
 * @Date: Create in 14:55 2019/3/27
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ByStagesServiceImpl implements ByStagesService {

    @Autowired private ByStagesMapper byStagesMapper;

    @Override
    public boolean modifyStatus(int status, int userId) {
        return byStagesMapper.updateStatus(status, userId)==1?true:false;
    }

    @Override
    public double getLoan(int userId) {
        return byStagesMapper.findLoan(userId);
    }
}
